#include "../src/SDLtoolkit/widgets/ExceptionLabel.h"
#include <string>
#include <iostream>

using namespace std;

void testExceptionLabel() {

	SDLEngine* engine = new SDLEngine();

	engine->start();

	ExceptionLabel* label = new ExceptionLabel("LALALA ", engine->getMainSurface(), 50, 50);
	label->setMessage("prueba 2");

	Event* event = new Event();

	bool quit = false;
	while (quit == false) {
		while (engine->pullEvent(event)) {

			label->handleEvent(*event);
			//handle event de los widgets

			engine->refreshScreen();
			if (event->getType() == Quit) {
				quit = true;
			}
		}
	}

	delete(label);

	engine->stop();

	Logger::log("Tests", "ExceptionLabel",	"Finalizado.");
}
